//
//  UIView+SafetyMargin.h
//  NineteenBook
//
//  Created by xhkj on 2021/8/2.
//  Copyright © 2021 58阅读. All rights reserved.
//

#import <UIKit/UIKit.h>

#define MinPixelScale    1/[UIScreen mainScreen].scale


NS_ASSUME_NONNULL_BEGIN

@interface UIView (SafetyMargin)



//判断是否为刘海屏
- (BOOL)isIphoneX;

- (CGFloat)statusBarHight;

- (CGFloat)naviBarHight;

- (CGFloat)tarBarHight;

//安全底部高度，针对iPhone X
- (CGFloat)safeBottomBarHight;

//安全顶部高度，针对iPhone X
- (CGFloat)safeTopBarHight;




//判断是否为刘海屏
+ (BOOL)isIphoneX;

+ (CGFloat)statusBarHight;

+ (CGFloat)naviBarHight;

+ (CGFloat)tarBarHight;

//安全底部高度，针对iPhone X
+ (CGFloat)safeBottomBarHight;

//安全顶部高度，针对iPhone X
+ (CGFloat)safeTopBarHight;

////边距
//+ (CGFloat)margins;
//
////首页边距，主页面的边距与其他页面不一样
//+ (CGFloat)mainMargins;

//+ (CGFloat)getAdMargin; //开屏广告距离底部的距离

@end

NS_ASSUME_NONNULL_END
